#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
	for (int i = 1; i < 100; i++)
	{
		int tonggoushu = i * i;
		if (tonggoushu % 10 == i || tonggoushu % 100 == i)
		{
			cout << i << endl;
		}
	}
	return 0;
}